use helper function instead of adding logic to the views