added advanced mode