add back in debug function