creates in, out and duration variables