Adds functionality of storing threads.