Edited requestObjectFactory function