updated barScript