added functionality in type.c and fixed build.cmd