fixed searching (now from start to end)