Just found this in the source of @Codulous