added testr wrapping code