rewrote logic of content file loading