added debug everywhere.