made some more helper functions