shorten code a bit by using the threading macro