wrote nthfromlast method. now testing it