use $BASH_SOURCE instead of $0