[WIP][issue #83] code finished