calculate tax and total