updating space debug function