added support for jpeg