bug due to new functoin