organize and add file loading func