mistakes corrected
int changed
extra search added