solve functional bug
fixing bugs