added details method to object