add compatibility code
removed debug code
adjust methods