naive implementation of addFirst