add a few helper functions
fix typo in helper method