making 3.x compatible