made some fix & improvement