added command line util

changed interface of creating the struct