added a few utility functions