| Year ended December 31 | 2017 | 2016 - Restated | 2015 | |||||||||
| Net income before discontinued operations | $ | 11,496,693 | $ | 3,624,323 | $ | 1,668,429 | ||||||
| Net income from discontinued operations, net of tax | 31,924,191 | 23,358,318 | - | |||||||||
| $ | 43,420,884 | $ | 26,982,641 | $ | 1,668,429 | |||||||
| Year ended December 31 | 2017 | 2016 | 2015 | |||||||||
| Weighted average shares outstanding for basic earnings per share | 15,636,853 | 15,002,005 | 13,461,609 | |||||||||
| Effects of dilution from: | ||||||||||||
| Stock options | 1,601,227 | 1,372,427 | 2,244,186 | |||||||||
| Warrants | 900,000 | 941,969 | 59,775 | |||||||||
| Weighted average shares outstanding for diluted earnings per share | 18,138,080 | 17,316,401 | 15,765,570 | |||||||||