implemented functionality for saving the prices