laid out general structure to firmware