added threads and lots of else + added color control