You can replace these two lines with: ```page = params[:page].to_i```