implement parsefile