fixes a few bugs and adds documentation for import