added some functionality for open
added handler for all but the relay commands