update calculation