adding row click logic