adding some automagic