We should wrap this into a transaction