This version work with read and write khoros, output need to be improved but for the input all default value case are considered