Merge codes for STORY 007 to master branch

Finish STORY 007: add promotion logic