solutions to exercises of chapter basics