merged work for using csm for compiling