use templating for repetetive stuff and swap order around