added initial support for fragments