format & cleanup