Upgraded api for 3.0 compatibility
Merge pull request #2 from josegonzalez/3-0-compatibility

3 0 compatibility