implemented close