add synchronized writer  
fix parallel calculator bug.