added timer with halfdelay input