resize functionality and menu button