added total amount calculation in search