adding helper to refractor tests
refractor test code using host_helper