1) fixed a bug in method getnumber. 2) added some print msg