added zarin code
added lock on thread table
added test3