added check valid