changed implementation of some methods
changed implementation of some methods an dmerged