debug is fully implemented