completely forgot to make /jpg use the newly created function