Implementing the backend