fixed code glitch, improved compliance tests and added timing tests