first working verison

clean up to follow