initial commit, pulled in from smnnepo branch