generic stuff to show some simple OOP and threading