copied from teamgenesis