fix to function effect