lots of changes, using the proper R package now.