add solution for remove nth from list end