Add get function inspired by Ember