checked variable to avoid segmentation fault