now the check function can return a true array