Do you have any ideas for a more elegant way of doing this?