updated to work with devise