implemented tax calculation