update based on parameters