cleaned up the abstraction