Added function checkadmin