added printChar function
added input prompt