updates few variables