many new fathures and several bug fixes