added revenue logic