modified to work with source folder