rebuilding as a gem