general backend work and data handling for frontend