This is probably a better way to do it.