fixes made to version 2 and version 3 changes

version 2 - greater strain on stack, fewer objects
version 3 - less strain on stack, many objects