nak score bugfix
code refactoring