added thread of calculation with bugs (need synchronized)