how to implement decrease quarry