implemented some invoice functionality