make jshint more happier
refactor: rename getWeight -> getTransition, which no returns transition dict.