added getSinks and getSources to patch