Just copying your function. :P