Adding all files with prototype and some logic