Modify the method to accept a string as a parameter