this is debugged now