adding thread to encryption process