first attempt at abstraction