Anisotropic models for compact stars