updated code for testing JS