added command to process queue
added some tests and display/update the number of available commands in queue while processing a command