better code for files modules