working on adding all api code to model