added output checks