spy and navbar functioning