It has to be possible to make this more elegant.