added debug capabilities