function library for authorizations