Modified method for person3.java