fixing find function