add function declaration
fix crash