check predecessor/successor