added wait and dio handlers
changed #define for few inst