FF does not like if function are declared *after* usage; fixed