update to reset left after resize and before rerunning function