added function "last"