Update and testing code