complete integration

Ready to merge.