changed check statement