added bar func