reorganize abstractions and implementations