update using functions