Updated so code is ruby formatted