Merge pull request #3 from johnchase/master

modified code
added function and test deck

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