removed not needed imports, double defined function and not needed query