created twig extension, registered it as service and updated the view to use it