changed for online mode