added proper debugging