added CS and JS versions