declaring total var