Fixed selection, now we are able to generate information and insert in db