Sample rules engine