major changes to get first working version