custom to_dict() function for models.
paginate get results.
merge GET and POST requests in one function.