try created Factory class