Changed up Star javascript logic