addtip prototype
[refactoring] addTip
[fix] unittest
[fix] tests