add building
improve algorithm
fix logback config, NPE in status, remove unused variables