added Factory class