Added help, added input variable d - duration