add bonus and fix some bugs