updated lots of code...