Pull request to budhram

Logic is fine but next time onwards give meaningful name to arguments x, y as line, index.