abstraction and fixes