added functions for extracting extensions and comparing them