fix buffer overflow handling
introduce simple numbers handling