Code for Backend proccessing