required inputs function added