added some simple tests... this code sucks.