Ok, this was pretty clever