added pre-load javascript back in