updated external mem and decode