move functions to model
Merge branch 'master' of https://github.com/AikChun/Hashkit