some fixes / final version