cache implementation
autoraise to error for exceptions
utility functions