reverted 80c01a6ed9575bc3b0b6bd70a62b1ba844368fc7, too many side-effects