factory model for module