fixed bug in the ur up uc computation. Added some debug messages that I will get rid of later