Edited the helper functions