implemented balance method