improved card squeeze code