clean code of sys_new_pages()