convert code to gem with rake task