first commit

Not complete porting of ver 1.1.1