correctly parsing out input