rewrite navbar. poor attempt at improving touch events