break the ymin/ymax logic out into one method
Merge pull request #144 from chriserin/refactor_ybounds

break the ymin/ymax logic out into one method