WIP - working on ajax requests to endpoints