complete rewrite of mal.py because mal-api.com is dead