changed js order (caused error)