initial commit of ported code