generalize sink logic