coding #4 modifying the method definition