Changed the way  finds value