First dirty draft, I need unit tests now