add bash functions to extract