makefile added; bug fixed in randperm