restructure the whole program
add class constructor and add parse instruction