taking math source directory as argument