Adding threads (TODO: Refactor)