add sink detection