added curtain functionality