threads support added