first try - corrected as far as i understood.

Got no idea how it really should look like - but probably thats the way.