code to work with great3 data