require command support and improving factory