finish basic match feature. TODO: 1. magic number remove. 2. add real random number.