changed a method that was throwing an error