added a couple helper functions