Working with 1 thread