Added debug version for testing