I added my code for the function