first fully working version (including creation)