first draft
some improvements