added comments, added some console interaction