move parsing files to anther function