removed unnecessary checks
changed while (cond) {} to do {} while (cond)
removed break from reading datya cycle