removed the second regex looking for the closing brace for a functional callback declaration