use foreach function to build the SOURCES variable