Update functionality and accept arrays.