initial import, basically seems to work, no real tests yet though