finalizing rails