add and modify tests for transtion, sampling; pep8 fixes