Chapter3 exercises continued