made it a local and also use $() syntax instead of the backticks, for consistency with the other code in the file