initial implmementation of normalized cut