still using if- for data input