function to remove meaningless columns, code clean up