add helper methods
add spec for helper