refac to gem builder