added balance functionality