add open/close methods for input device