switched back to local js , fixed cloes brace