Added attributes.lua for updating derived attributes