re-worked with updated LocalWrapper