updated sql query
added packageID query