choosing moves from db implemented, not working expectedly