import first version from my master thesis