cleaned up the code a bit and put the package version back