added square brackets around max and min nodes
updated lib