fix update and resize methods
rename var to
update