Add rewrite for scheduling