added isExist function