getPrice method implemented