modularized the makefile and added extra input sequence