adding argument and file handling