fixed variable array declaration, fixed kernel flipping