That's why I asked you to improve it. But I ended up doing it myself. Ill send a pull request in a minute.