add dropdown and fix bugs