Adding thread implementation, in progress