adding some refacoring stuffs.