finished the side menu logic