helper method
refactor