organized the file a little, added dynamic growth
turned struct of arrays into array of structs layout