fixing contains to work with javascript. closes #16