fixed all methods to use ecmascript less than version 5 for consistency and cross browser workability.