add some printf and probably correct