helper functions, mainly to use in views