use the right mime type
make the function static and prefix it with _