more porting to be independant