anonym thread classes removed. implemented with inner classes