added some basic utility functions