added debugging features