refactors code to accurately store object containing numerical element values