more elegant way to drop the final slash