set values from input array