Added support for fragments and example