Added support for presets. Thanks harriha