append version periods and spaces only when necessary