Implemented CloseCommmand and OpenCommand