added getAll method for structures