reorged the javascript selfie.