weighted interval scheduling with dynamic programming added