Added check function