changed default time slice position
put the processing in a thread to avoid memory leaking