initial commit of nearly finished version