added function and test deck

function failed