add clear stack function
Merge branch 'develop'