nearly done on generating the bar code pattern