copied from teering