code is not ruby 2.0 compliant (not backward-compatible)