bugfix and refactoring

- bugfixed spec test
- refactoring method name