initial work on jpg.c