input from prof @mrb_bk