split out compatibility layer into sink and source