solver C1Q1 by using two different ways

not as good as the first solution. but could be useful in different
cases
refactor C1Q2

giving better names and adding more descriptioins
refactor C1Q3

giving better names and more description