open and close alarm (not finished)