Solved Merged functions