Worked on update function, global constants