added timer functionality, improved multiplexer