Completed up to ch4 code, also added my own