some debugging features added