split rest functionality out into adapter