made Array.contains template method