added parsing for target directory