added autoaccept functionality