input/otput and some fixes
clean up