a better way to nest