Updated extract function in bash_profile