Is this the type of thing you were talking about? I couldn't think of a neater way to get this in here, but I know you said there were more graceful ways of accomplishing this.