added some parsing of inputs