Second half of chapter2 working