Improve use object instead of array