added draw detection