method to find value from objects
changed table to directly use the classes