Update function takes properties and data too.