method factory pattern added