Updated API to 3.1