commiting changes before atempting using objects instead of arrays