fixed tabs and split cmd_new_wps into 2 functions