Finished all helper functions but "applyOperator"