partially done with xml gen (with some hard code)