you should define helper method or model decorator method.
get out logic from view.