Added check for versions to change behavior accordingly