delete old code, fix findbugs