Refactored UPD. array func. to only use functions