function add bar created