working on helper functions