fixed #273

@ianb this is ready to be hooked up