incomplete hw5 -- tail not working