added find_max and some docs