working gem, with most of the features, but tests and docs needed