fixed bug in function prototype