Updated to v3.1 API