implemented "stop"/terminate thread functionality