pretty close to complete porting now