Passes unit test
Fix up code to use new interface
Handle empty fields