Design and analysis of loyalty reward programs