figured out how to extract data from inputs