add dimentionreduction + some debugging