added support for firmware upgrade