add flags to differ between server and gen