Added a small library of functions