script used to debug