made code compatible with 0.8