fixed column edge case and renamed a few variables