adding revenue function
Merge branch 'local'