Finished all helper functions