remove use of 17+ function lists:droplast/1