fromElements and fromCollection source added + refactor