A dynamic trust model exploiting the time slice in WSNs