added input queueing system and linked to xml