updated collapse function on navbar