The following table sets forth the computation of the basic and diluted earnings per share for the three and six months ended June 30, 2017 and 2018 (in thousands, except per share data): | | | | | | | | | | | | | | | | | | Three Months Ended June 30, | | Six Months Ended June 30, | | 2017 | | 2018 | | 2017 | | 2018 | Numerator for basic and diluted earnings per share: | | | | | | | | Net income | $ | 4,410 |
| | $ | 2,747 |
| | $ | 11,494 |
| | $ | 12,103 |
| Less: Earnings allocated to unvested restricted stock | (15 | ) | | (14 | ) | | (43 | ) | | (67 | ) | Income attributable to common stockholders | $ | 4,395 |
| | $ | 2,733 |
| | $ | 11,451 |
| | $ | 12,036 |
| | | | | | | | | Denominator: | | | | | | | | Denominator for basic earnings per common share - weighted average shares outstanding | 16,652 |
| | 17,916 |
| | 16,625 |
| | 17,010 |
| Effect of dilutive securities: | | | | | | | | Stock options | 377 |
| | 212 |
| | 381 |
| | 240 |
| Convertible Notes | 1,064 |
| | 117 |
| | 1,077 |
| | 674 |
| Denominator for diluted earnings per common share - weighted average shares outstanding | 18,093 |
| | 18,245 |
| | 18,083 |
| | 17,924 |
| | | | | | | | | Basic earnings per common share: | $ | 0.26 |
| | $ | 0.15 |
| | $ | 0.69 |
| | $ | 0.71 |
| Diluted earnings per common share: | $ | 0.24 |
| | $ | 0.15 |
| | $ | 0.63 |
| | $ | 0.67 |
|
|