move del function to libjs