added some check