Adding more debug functions