change to bash functions