Switch only works for closed doors. Nice improvemente in iterations.