moved get_role to db