update query function for jimmy