deleted unnecessary row() col() statements, optimized as far as possible