Implemented 2nd task (pet)