Sustainable rehabilitation of rural architecture