first step of writing results