Taking object as input