fleshing out basic functionality and unit tests