Would be good to have function to do this in the future.