add contents assist function and fixed bug