added length and last methods