This could use some failure checking.