refactored authorize to act as a boolean