a lot of fix and improovments