splitting files and adding map