added rolling proportion function