added simple memoize function - replaced memoizee which isn't compatible with IE7+