added functional categories numbering to create a flat javascript object