Finished Ruby Script ver.1