added order constants
document factory prototype