constructor file example

refactored the example constructor to file-like format