added invoice total rate and improved some features