First version of the backend