fixed function in example