simple shared version, and some fixes