now works in rails