close command implemented