worked a massive ammount of formatting and on the update function