change check routine from arg to os