working on q1 code