remove garbage and do some fixing