made some minor changes to v6