initial and naive implementation but more than good for me