added submitted=1 to function countLabs