Using a more ruby'ish approach