added maximum height for graph