changed function for sticky navbar