rewrote firstn so it is more efficent and works on seqs
added more tests for firstn