fix bugs and add level up