formatting work and cleanup