fixed assignment and added lots of sysouts