added populate fields functionality and some command line processing logic