added scheme, minor bug fixes