reverted back to changes from version 5