added fuctions for updating dimensions and checking if mobile