modified random projection script