added check function