use daemon and another way of using threads