initial commit of old v2 code