working on some haskelly functions for bounds