helpers from my github monadish project
see unit tests there
