add uses and cleanup code