Which could be done easily with a slight change to the code I posted.