Added static variable

Made cd array static, now only restricted to main.c