rewrite card face calculation logic in host