partial conversion to v8