updated for pre-cran retistruct