added ha3 for max, not sure about some solutions, but far too lazy to correct them