solved issue 22(adding balance at the top)