moved to debug_print instead of stdio