expense functionality and calculations