working out the frontend