do some cleanup work for #1