removed redundant check function