some more work + some cleanup