changing to obj from array