fixed q1 to not use set