function always sais 'deck valid'. need to fix it