Added backend code for UI