added Q1 code