remove debug, fix tests