added non scheduling version for debugging