todo: add test for thread safety while adding task