fixed some bugs in underscore last function, and implemented underscore first function