make a function to debug