added firmware code