added closing task feature