allow define request class internally in factory