fixed misdeclared function