adding lots of helper functions