Creating new thread and somehow working