made changes for version 2 with Raw Input