Updated to allow for version 4