started porting code from DomoMaker