utilize deque's builtin maxlen argument