fixed pluck function