trying to handle navbar buttons better