a new feature and some cleanup