making topbar function like it's working