first version of mastermind solution done, needs slight revision