This function should also be calling prepare