updated both versions so that they are as close a match as possible