re-structured into ruby gem