fdm port. initial commit