added active class and bookmark logic