move formatPrice method from View to functions