did some corrections and adaptions