input changed from object to an array