moved all resource loading into the head