refactor tail test
refactor guawa implementation.