first working version (documentation soon)