cleaning up messy code complete