some refactoring in the filed
lots of updates