base function is ok; reformat code