add proper main loop and fix blocking getch()
Merge pull request #7 from IGI-111/dyn

add proper main loop and fix blocking getch()