my solution for Mastermind