multi-Thread support added.