removed console log and updated isAdmin function