new variant of last task. now work with decimal point.