added some lin file handling. not sure if it works yet.