fix for #3 - using test driven development to expose and fix bug