fix bug. rename function