Took out helper functions