add support for scheduling anonymous functions