starting to implement automatic bracket refreshment with js