First fully working, not tested