added a few helper functions