done fixing bugs. please check your codes if naay side effect