added debug/testing code