better code
some bugfix and better code
file conflcit solved