added checking for admin