improving debug and ex22