Working on 3.x compatiblity