Changed order of definition to correct prototype reference