Implemented Walsh coefficients calculation (correct)