fixed all issues with factory object
renamed scope variables