Deleted the variable k. It was unnecessary