added input reader and parser