Main update of functions