correct implementation of threading