refactored as a ruby gem