optimized data cache and state machine