added test data
added javascript version