some cleanup / rework