working on implementing -i command line option