added tests for xMaxBy or xMinBy
fixed mege conflict