Added faster source
Adjusted for rails