Added logic code
Fixed centering of the label
Added captions