Added a few debug msgs and extra helper method