added mod 6 soln