updating code and schematic