Add function. But not finished bug fix.