changed placement of bar and created related function file