some explanation for the weird object/function hackery