added dynamic mazing