fix usage factory method