fn not defined error