Add a logic to done button