Working search, but need a better move gen function