refactor factories
better code style
better style
fix merge confligt