small changes - includes debug code