add a few helper functions