updated to work with newest gems