Effects of molecular weight and chain ends on glass transition of polystyrene