Modified code to match Ruby Style Guide