deck code and a checker for debug