Added rand method