trying to structure the code a bit... not easy
merge
merge