write logic control of main function for bi-directional converter
update structure of files