Edited my function and tested it successfully

Edited my function and tested it successfully