this gem needs tests. here's a start!