added debug func