added helper method and formatted