pull out simulation & GP code in separate files