added function "factory"
Merge remote-tracking branch 'origin/master'