Added getEarnings method