Updated code to work with 3.3.x. Ensured tests are passing