first working version of manytomany