Version submitted to CRAN on the 24th September 2014