fixed issue #30 and altered the way attributes are read
adding a thread for processing work. Not finished yet