updated generic function for price / getting / setting