This function has changed COMPLETELY.
The diff is USELESS.
View the source code directly.