factoring out Bar code to handle multiple types of bars and docks
factoring out Bar code to handle multiple types of bars and docks