reworked Teodor's Idea