add the implementation of MODE