some changes, see TODO