chunk 1 remains mostly same